﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using web_uchet.Security.Interfaces;
using web_uchet.Security.Enums;
using System.Web.Mvc;

namespace web_uchet.Security
{
    //<summary>
    //Поставщик просмотрщиков пользователя+
    //Обертка над membership и roles API.
    //</summary>
    public interface IUserOperationsProvider
    {
        IViewUser GetUserView(string UserName);
        LoginResult LoginUser(string UserName, string Password, bool rememberMe);
        void LogOut();
        bool IsCurrentUserAnonymous();
        System.Web.Security.MembershipCreateStatus CreateUser(IViewUser User, bool LogOn);
        bool IsUserInRole(string UserName, UserRoleEnum Role);
        bool IsUserInRole(IUser User, UserRoleEnum Role);
        UpdateUserResult UpdateUser(IViewUser User);
        void ChangePassword(web_uchet.Security.ChangePassword Changes);
        void AddCompany(IViewNewCompany ViewNewCompany);

        SelectList GetCurrentCompanyWorkPlacesList(int? WorkPlaceID);
        SelectList GetUserRolesList(string Role);
        void SetCompanyAccount(int CompanyID, string Amount);
        SelectList GetCompanysEmployees(int CompanyID, int? EmployeeID);
        SelectList GetCompanysManagers(int CompanyID, int? EmployeeID);
        SelectList GetCompanysExecutives(int CompanyID, int? EmployeeID);
        SelectList GetCompanysAdmins(int CompanyID, int? EmployeeID);
        SelectList GetUserCompanysClients(int CompanyID, int? EmployeeID);

        ProgramContext GetMasterPageData(int CurrentUserID);

        web_uchet.ViewModels.ViewКомпания GetUsersCompany(string UserName, string Pass);
        web_uchet.Models.Компания GetUsersCompany(int UserID);
        bool UserNotExistst(string UserName);
    }

}
